'''
Created on 2011-07-04

@author: Earl Bell

This module stores constants and global variables used throughout the OSEKits project
'''

'''
Sensor modes
'''
THERMOCOUPLE_MODE = 0x00 
ENCODER_MODE = 0x01
PHOTOGATE_MODE = 0x02

'''
Graphics display configuration
'''
MENU_ROW = 0
FIRST_DISPLAY_ROW = 1
CONTROL_ROW = 5

'''
Acknowledge packet Values
'''
ACK_OK = 0x03
ACK_ERR = 0x00
ACK_DONE = 0x02

'''
Micro-controller ADC data
'''
ADC_voltage_max = 1.1
ADC_number_of_steps = 1024

'''
Thermocouple gain factor
'''
Thermocouple_gain_factor = 1000

'''
Control Packet Values
'''
CONTROL_STOP = 0x00
CONTROL_START = 0x03

'''
Serial data bit masks
'''
PACKET_TYPE_MASK = 0X07
PACKET_LENGTH_MASK = 0x38
'''
Packet Types
'''
NULL_PACKET = 0x00
CONTROL_PACKET = 0x03
CONFIG_PACKET = 0x01
MEASUREMENT_PACKET = 0x02
ACKNOWLEDGE_PACKET = 0x04
'''
Time out length in milliseconds
'''
TIMEOUT = 10